//
//  OPHelperAccountHeaderView.m
//  OnePiece
//
//  Created by lanou on 15/10/31.
//  Copyright © 2015年 wsy. All rights reserved.
//

#import "OPHelperAccountHeaderView.h"

@implementation OPHelperAccountHeaderView

- (instancetype)initWithFrame:(CGRect)frame
{
    if (self == [super initWithFrame:frame]) {
        _iconView = [UIButton buttonWithType:(UIButtonTypeCustom)];
        _iconView.frame = CGRectMake(70, 15, 20, 20);
        [_iconView setImage:[UIImage imageNamed:@"zyciconfont-rili (1)"] forState:(UIControlStateNormal)];
        [self addSubview:_iconView];
        
        NSDate *date = [NSDate date];
        NSDateFormatter *dateformatter=[[NSDateFormatter alloc] init];
        [dateformatter setDateFormat:@"YYYY年MM月dd日"];
        NSString *locationString=[dateformatter stringFromDate:date];
        
        _contentLabel = [[UILabel alloc]initWithFrame:CGRectMake(100, 10, 200, 30)];
        _contentLabel.text = locationString;
        [self addSubview:_contentLabel];
        
        _money = [[UILabel alloc]initWithFrame:CGRectMake(SCREEN_WIDTH - 150, 10, 130, 30)];
        _money.textColor = [UIColor colorWithRed:0.914 green:0.262 blue:0.242 alpha:1.000];
        _money.textAlignment = NSTextAlignmentRight;
        _money.font = [UIFont systemFontOfSize:15];
        [self addSubview:_money];
        
        _backBtn = [UIButton buttonWithType:(UIButtonTypeCustom)];
        [_backBtn setImage:[UIImage imageNamed:@"zyciconfont-houtui-1"] forState:(UIControlStateNormal)];
        _backBtn.frame = CGRectMake(10, 10, 30, 30);
        [self addSubview:_backBtn];
        
        _totleLabel = [[UILabel alloc]initWithFrame:CGRectMake(SCREEN_WIDTH - 130, 10, 110, 30)];
        _totleLabel.font = [UIFont systemFontOfSize:15];
        [self addSubview:_totleLabel];
    }
    return self;
}
@end
